//
//  YSSearchArticleCell.m
//  Yueshi
//
//  Created by yueshi－mac1 on 16/2/22.
//  Copyright © 2016年 悦食中国. All rights reserved.
//

#import "YSSearchArticleCell.h"
@interface YSSearchArticleCell()
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UIImageView *redHeartView;
@property (weak, nonatomic) IBOutlet UILabel *markNumLabel;
@property (weak, nonatomic) IBOutlet UIImageView *articlePic;

@end

@implementation YSSearchArticleCell

+ (instancetype)cellWithTableView:(UITableView *)tableView{
    static NSString *ID = @"YSSearchArticleCell";
    YSSearchArticleCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"YSSearchArticleCell" owner:nil options:nil] lastObject];
    }
    return cell;
}

- (void)setReview:(YSReviews *)reviews{
    [self.titleLabel setText:reviews.postName];
    [self.markNumLabel setText:[NSString stringWithFormat:@"%ld人收藏",reviews.praiseNum]];
    [self.articlePic setImageURLStr:reviews.imgList];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
